<template>
	<cc-theme-wrapper>
		<view class="cc-card">
			<view class="cc-menu-container">
				<view class="cc-card-row">
					<view class="cc-card-item">
						<view class="menu" @click="navigateTo('/pages/enquiry/form/form')">
							<image class="menu-image" src="@/static/images/home/menu-order.png"></image>
							<view class="menu-text"> 门店自取 </view>
							<view class="menu-comment">茶友里面请</view>
						</view>
					</view>
					<view class="divider"></view>
					<view class="cc-card-item">
						<view class="menu" @click="navigateTo('/pages/enquiry/form/form')">
							<image class="menu-image" src="@/static/images/home/menu-pickup.png"></image>
							<view class="menu-text"> 外卖点单 </view>
							<view class="menu-comment">奉茶到茶</view>
						</view>
					</view>
				</view>
				<view class="cc-card-row">
					<view class="item">
						<view class="menu" @click="navigateTo('/pages/enquiry/form/form')">
							<image class="menu-image-sm" src="@/static/images/home/menu-recharge.png"></image>
							<view class="menu-comment">储值</view>
						</view>
					</view>
					<view class="divider-sm"></view>
					<view class="item">
						<view class="menu" @click="navigateTo('/pages/enquiry/form/form')">
							<image class="menu-image-sm" src="@/static/images/home/menu-collective.png"></image>
							<view class="menu-comment">拼单</view>
						</view>
					</view>
					<view class="divider-sm"></view>
					<view class="item">
						<view class="menu" @click="navigateTo('/pages/enquiry/form/form')">
							<image class="menu-image-sm" src="@/static/images/home/menu-book.png"></image>
							<view class="menu-comment">预定</view>
						</view>
					</view>
					<view class="divider-sm"></view>
					<view class="item">
						<view class="menu" @click="navigateTo('/pages/enquiry/form/form')">
							<image class="menu-image-sm" src="@/static/images/home/menu-sign.png"></image>
							<view class="menu-comment">签到</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</cc-theme-wrapper>
</template>

<script setup>
	import {
		ref
	} from 'vue';
</script>

<style lang="scss" scoped>
	@import "@/style/var.scss";

	/* 卡片 */
	.cc-card {
		border-radius: 0rpx;
		background-color: #ffffff;
		box-shadow: $box-shadow;
		margin: 0rpx 20rpx 15rpx 20rpx;
	}

	/* 容器 */
	.cc-menu-container {
		position: relative;
		padding: 20rpx;
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		/* 整体水平居中 */
		justify-content: center;
	}

	.cc-card-row {
		display: flex;
		/* 每行内容水平居中 */
		justify-content: center;
		align-items: center;
		/* 占据容器全宽 */
		width: 100%;
		/* 为分割线定位准备 */
		position: relative;
	}

	.cc-card-item {
		display: flex;
		justify-content: center;
		align-items: center;
		box-sizing: border-box;
	}

	/* 第一行两个元素的宽度分配 */
	.cc-card-row:nth-child(1) .cc-card-item {
		/* 50%宽度减去分割线空间 */
		flex: 0 0 calc(50% - 10px);
	}

	.divider {
		width: 1rpx;
		height: 120rpx;
		background-color: $uni-border-color;
		opacity: 0.6;
	}

	.item {
		flex: 0 0 calc(25% - 10px);
		display: flex;
		justify-content: center;
		align-items: center;
		box-sizing: border-box;
	}

	.divider-sm {
		width: 1rpx;
		height: 40rpx;
		background-color: $uni-border-color;
		opacity: 0.6;
	}

	.menu {
		width: 100%;
		padding: 10rpx;
		margin: 8rpx 0 5rpx 0;
		justify-content: center;
		display: flex;
		flex-direction: column;
		align-items: center;
		transition: transform 0.3s ease;

		&:active {
			transform: scale(0.95);
		}

		.menu-image {
			width: 80rpx;
			height: 80rpx;
			margin-bottom: 20rpx;
		}

		.menu-image-sm {
			width: 50rpx;
			height: 50rpx;
			margin-bottom: 5rpx;
		}

		.menu-text {
			font-size: 32rpx;
			font-weight: 550;
			margin-bottom: 8rpx;
			color: #353535;
		}

		.menu-comment {
			font-size: $uni-font-size-sm;
			color: $uni-text-color-grey;
		}
	}
</style>